<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>


  <div id="app">
    <!-- v-on:事件名 = "函数" -->
    <!-- <button v-on:click="fn">点我</button> -->
    <!-- <button @click="fn">点我</button> -->
    <br>
    <!-- 内联语句 -->
    <button @click="count--">-</button>
    <span> {{count}} </span>
    <button @click="count++">+</button>
  </div>

  <script src="./vue2.6.12.js"></script>

  <script>

    var app = new Vue({
      el:'#app',
      data:{
        count:10
      },
      methods:{
        // fn : function(){}
        // ES6 新语法标准
        // ECMAScirpt 5 / 6 7 8 9 10 ... ES6+
        fn(){
          alert('你点击了我')
        }
      }
    })

    

  </script>
</body>
</html>